package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.query.impl.EmployeeQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    int updateByPrimaryKey(Employee record);

    int queryForCount(EmployeeQuery qo);

    List<Employee> queryForList(EmployeeQuery qo);

    List<Employee> selectAll();

    Employee getByUsername(String username);

    void changeState(Long id);

    void rsetPassword(@Param("id") Long id,@Param("s") String s);

    void insertRelation(@Param("employeeId") Long employeeId, @Param("roleId") Long roleId);

    void deleteRelation(Long id);

    List<Long> getRoleIdByEmployeeId(Long id);
}